<%@ page import="instructor.sample.*" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<% 
   String today = null;
   Today t = new Today();
   today = t.getToday();
   request.setAttribute("picture","MRDevice");
   request.setAttribute("title", "Customer Listing");  
   request.setAttribute("header", "Welcome : Today is " + today); 
 %>
 <%@ include file="header.jsp"%>
<TD width="850" vAlign="top"> 
<%	
ResultSet rs = null;

%>
<br /><h2>Customer Listing</h2><br />


<table width=100% border=0>
<%
Customer c = new Customer();

rs=c.customerList(); 
%>	 
		<tr>
		<th bgcolor="#3B73B9" style="color:white;">Customer Name</th>
		<th bgcolor="#3B73B9" style="color:white;">Customer Type</th>
		<th bgcolor="#3B73B9" style="color:white;">City, State</th>
		<th bgcolor="#3B73B9" style="color:white;">Contact Name</th>
		<th bgcolor="#3B73B9" style="color:white;">Contact Phone</th>
		</tr>			 
<%  
while (rs.next()) {   
%>

        <tr>
        <td>><a href="customerdetails.jsp?customerid=<%=rs.getString("customerid")%>&msgerror=2"><%=rs.getString("customername")%></a></td>
		<td><%=rs.getString("customertype")%></td>
		<td><%=rs.getString("local")%></td>
		<td><%=rs.getString("contactname")%></td>
		<td><%=rs.getString("contactphone")%></td>
		</tr>
 <%  } %>
</table>
<%
rs.close();
%>
</TD></TR></TABLE></body></html>